/*
 * @Description: 视频监控
 */
import zhreq from "@/api/axios";
// import zhreqtwo from "@/api/axios";
export default {
  /**
   * @description: 通过摄像id获取摄像头详细信息
   * @param {String} cameraId
   * @return {Array}
   */
  getcameramessage(params) {
    return zhreq.post(`v3/iot/platformCamera/queryCameraAllInfo?cameraId=${params}`)
  },
  /**
   * @description:获取摄像头列表
   * @param {String} cameraId
   * @return {Array}
   */
  getcameraList(params) {
    return zhreq.post('/v3/iot/cameraFacilityMapper/queryByCondition', {
      ...params
    })
  },/**
  * @description:获取合并·摄像头列表
  * @param {String} cameraId
  * @return {Array}
  */
  gethbcameraList(params) {
    return zhreq.get(`/v3/iot/cameraFacilityMapper/queryByFacilityNo?facilityNo=${params}`)
  },
  /**
   * @description:摄像头控制开始
   * @param {String} cameraId
   * @param {String} direction：0-上，1-下，2-左，3-右，4-左上，5-左下，6-右上，7-右下，8-放大，9-缩小，10-近焦距，11-远焦距 , 'speed': 云台速度：0-慢，1-适中，2-快
   * @return {Array}
   */
  controlcamera(params) {
    return zhreq.post('/v3/iot/cameraOperation/start', {
      ...params
    })
  },
  /**
   * @description:镜像翻转
   * @param {String} cameraId
   * @description: 'command':镜像方向：0-上下, 1-左右, 2-中心
   */
  mirrorcamera(params) {
    return zhreq.post('/v3/iot/cameraOperation/mirror', {
      ...params
    })
  },
  /**
   * @description:停止摄像头控制
   * @param {String} cameraId
   * @return {Array}
   */
  stopcamera(params) {
    return zhreq.post('/v3/iot/cameraOperation/stop', {
      ...params
    })
  },
  getAllCameraList(params = {}) {
    return zhreq.post('/v3/iot/camera/queryByCondition', {
      ...params, organizationNo: sessionStorage.organizationNo
    })
  },
  getCameraList(params = {}) {
    return zhreq.post('/v3/40089-process-v2/camera/queryByCondition', {
      ...params, organizationNo: sessionStorage.organizationNo
    })
  }
};
